package top.kaoshanji.r1ch04a;

/**
 * 代码清单-r1ch04a-78页a：一个POJO
 * @author kaoshanji
 * ^_^
 * create time 2025/5/4 17:10
 */
public class Car {

    private String brand;

    private String color;

    private int maxSpeed;

    public Car() {
        System.out.println("...我是无参构造器...实例化一个Car...");
    }

    public Car(String brand, String color, int maxSpeed) {
        this.brand = brand;
        this.color = color;
        this.maxSpeed = maxSpeed;
    }

    public void introduce() {
        System.out.println("...我是没有参数的方法...");
        System.out.println("brand: "+brand+" ;color: "+color+" ;maxSpeed: "+maxSpeed);
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getMaxSpeed() {
        return maxSpeed;
    }

    public void setMaxSpeed(int maxSpeed) {
        this.maxSpeed = maxSpeed;
    }
}
